<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="java.sql.*"%>
<%@ page import="java.util.*"%>
<%@ page import="com.gzgi.framework.*"%>
<%@ page import="com.gzgi.framework.util.*"%>
<%@ page import="com.gzgi.framework.context.*"%>
<%@ include file="/pages/system/checkAdmin.jsp"%>
<%
		Connection con = null;
        PreparedStatement psmt = null;
		ResultSet rs = null;
		List rows = new ArrayList();
		try {
			    con = ContextFactory.getConnection();
			    Statement stmt = con.createStatement();
			    rs = stmt.executeQuery("select actorId from sys_user ");
				while(rs.next()){
					String actorId = rs.getString(1);
					String activationCode = UUID32.getUUID();
				    psmt = con.prepareStatement(" update sys_user set activationCode = ? where actorId = ?  ");
					psmt.setString(1, activationCode);
					psmt.setString(2, actorId);
				    psmt.executeUpdate();
				    psmt.close();
					psmt = null;
				}

			  rs.close();
			  stmt.close();
			
			  out.println("<br><div align=center>Commond OK</div><br>");

		} catch (Exception ex) {
			ex.printStackTrace();
			throw new RuntimeException(ex.getMessage());
		} finally{
			try {
				if (con != null && !con.isClosed()) {
					con.close();
				}
			} catch (Exception ex) {
				ex.printStackTrace();
			}
		}
	
%>